#pragma once

#include <adwin/ADwin_export.h>

#include <memory>

namespace ADwin {
namespace Driver {
class ADwinSystem;
class FParameter {
 public:
  static constexpr int MaxIndex = 80;

  explicit FParameter(ADwinSystem* adwinSystem, int parameterNumber);
  ~FParameter();

  FParameter() = delete;
  FParameter(const FParameter&) = delete;
  FParameter& operator=(const FParameter&) = delete;
  FParameter(FParameter&&) = delete;
  FParameter& operator=(FParameter&&) = delete;

  float value() const { return valueAsSingle(); }
  void setValue(float value) { setValueAsSingle(value); }

  double valueAsDouble() const;
  void setValueAsDouble(double value);

  float valueAsSingle() const;
  void setValueAsSingle(float value);

 private:
  struct Impl;
  std::unique_ptr<Impl> _impl;
};
}  // namespace Driver
}  // namespace ADwin